package com.hexacta.hrs.domain.mentoring;

import java.util.Date;

import org.vectrics.common.util.DateUtil;

/**
 * Representa el periodo de duracion de una asignacion de mentor.
 * 
 * @author ncortinez
 * 
 */
public class MentoringPeriod {
    static private String NO_DATA = " ";

    private Date dateFrom;

    private Date dateTo;

    @Override
    public String toString() {
        if ((dateFrom != null) && (dateTo == null)) {
            return DateUtil.getFechaFormateada(dateFrom) + " - today";
        }
        if ((dateFrom != null) && (dateTo != null)) {
            return DateUtil.getFechaFormateada(dateFrom) + " - " + DateUtil.getFechaFormateada(dateTo);
        }

        return NO_DATA;
    }

    public void setDateFrom(Date dateFrom) {
        this.dateFrom = dateFrom;
    }

    public Date getDateFrom() {
        return dateFrom;
    }

    public void setDateTo(Date dateTo) {
        this.dateTo = dateTo;
    }

    public Date getDateTo() {
        return dateTo;
    }
}
